package com.aixx.springcloud.alibaba.controller;

import com.aixx.springcloud.alibaba.domain.CommonResult;
import com.aixx.springcloud.alibaba.domain.Order;
import com.aixx.springcloud.alibaba.service.OrderService;
import org.checkerframework.checker.units.qual.C;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author shkstart
 * @create 2021-02-18 1:06
 */

@RestController
public class OrderController {

    @Autowired
    private OrderService orderService;

    @GetMapping("/order/create")
    public CommonResult create(Order order){

        orderService.create(order);
        return new CommonResult(200,"订单创建成功");
    }
}
